home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / comm / fido / wpl_intro.lzh / wpl / atronx.wpl next >
Text File  |  1993-02-26  |  25KB  |  818 lines

  1.  ;
  2.  ; $Header: NetWork:src/RCS/atronx.wpl,v 1.10 93/02/26 21:07:10 rwm Exp Locker: rwm $
  3.  ;
  4.  ;  This is an example config file, and is the one that I am currently running
  5.  ; on 163/109 (line 1) and 1:163/139 (line 2).  It is NOT reccomended that anyone
  6.  ; run this script exactly as it is shown as it is a 'testing' script where I
  7.  ; am doing many things that people would not be doing in a normal situation. 
  8.  ; I am attempting to test all the features of WPL, not to emulate the old
  9.  ; version of Welmat or to provide an example of the 'best' way to set things
  10.  ; up. Other example scripts exist and it is requested that you look at one
  11.  ; of these.
  12.  ;
  13.  ; If you do not use a section of a script, semicolon it out so that it will
  14.  ; not take up ram while you are RUNNING ;-)
  15.  ;
  16.  
  17.  ; Just in case a null jump is SubJump'd ;-)
  18.   Print "You Goofed up your config, eh!"
  19.   return
  20.  
  21.  
  22.  ; Wow, We got a request to dial.
  23.  dodial:
  24.  ;   cmp $(line) 2
  25.  ;  falsejump dial-line1
  26.  
  27.  
  28.  ;   cmpi $(remote.address) "natalie"
  29.  ;  truejump forward-line1
  30.  ;  cmpi $(remote.address) "fidonet#1:163/109.36"
  31.  ;  truejump forward-line1
  32.  
  33.  ; the rest are OK to dial on this line.
  34.  ;  jump dodial0
  35.  
  36.  ;  forward-line1:
  37.  ;  CallForward 1
  38.  ;  Print "Call to $(remote.address) forwarded to line 1"
  39.  ;  jump waitring
  40.  
  41.  ;  dial-line1:
  42.  ; Currently, no restrictions on the line 1 dialing.
  43.   
  44.  ;   DoDial0:
  45.  ; clear the inbound buffer to clear any negotiation 'line noise'.
  46.    ModemClear
  47.    PutLog "[$(line)] $<time> Trying to connect to $(remote.address)"
  48.    FlushLog
  49.    Print "Network: $(remote.network)  Domain: $(remote.domain)\n"
  50.    Print "Zone: $(remote.zone) net: $(remote.net) node: $(remote.node) point: $(remote.point)\n"
  51.    Cmpi $(remote.address) "NRC"
  52.    TrueJump nrccall
  53.    Cmpi $(remote.network) "UUCP"
  54.    TrueJump dodial4
  55. ;   set host.wzcap 77
  56.    set host.wzcap 13
  57. ;   set host.wzcap 1
  58.  
  59.    Print "A Fidonet call to $(remote.address)!\n"
  60.  
  61.  ; look up the address, and put the information in the 'stem' variable 'remote'
  62.    system "network:bin/jamtool -$(remote.network) $(remote.address) $(line) nodelist: "
  63.    Print "Lookup: $(RC)\n"
  64.    set remote.number ${$(line).number}
  65.    set remote.password ${$(line).password}
  66.    CMPI $(remote.address) "fidonet#1:1/109.0"
  67.    falsejump dodial1
  68.    set remote.number 2317144
  69.    Jump dodial1
  70.  
  71.  dodial4:
  72.    Print "A UUCP call to $(remote.address)!\n"
  73.    Address "REXX" "rexx:uulookup.wplrx $(remote.address)"
  74.    Print "Rexx Return $(RC)\n"
  75.  dodial1:
  76.    cmpi $(remote.number) ""
  77.    FalseJump dodial2
  78.    PutLog "[$(line)] $<time> I don't know the number for $(remote.address)"
  79.  ; reports back to the script that caused the dial that it couldn't dial
  80.    ReportSesStat 36
  81.    Jump waitring
  82.  dodial2:
  83.  ;  SmartSend "|~ATDT$(remote.number)|"
  84.   SmartSend "ATDT$(remote.number)|"
  85.  ; Set the slave state to 'Outbound'
  86.    Set state "DIALING"
  87. ; Look for a modem response, with a timeout of 30 seconds
  88.    GetResponse 45
  89.    cmpi $(event) "CONNECT"
  90.    TrueJump callconnect
  91.    PutLog "[$(line)] $<time> $(EVENT) ($(lastresponse))"
  92.    cmpi $(event) "BUSY"
  93.    falseJump dodial3
  94.    set temp 5
  95.    jump  dodial3
  96.    set temp $(RC)
  97.    PutLog "[$(line)] $<time> Error: $(temp)"
  98.  dodial3:
  99.    PutLog "[$(line)] $<time> Session result $(temp)"
  100.    ReportSesStat $(temp)
  101.    Jump waitring
  102.  
  103.  callconnect:
  104.    Set state "SESSION"
  105.    Print "CallConnect\n"
  106.    PutLog "[$(line)] $<time> $(lastresponse) ($(baud))"
  107.    cmpi $(remote.network) "UUCP"
  108.    TrueJump callconnect1
  109.    PutLog "[$(line)] $<time> Fidonet Call to $(remote.address)"
  110.    set host.sitename "AmigaTronix: Here's some stuff!!!"
  111.    FlushLog
  112.    CmpI $(remote.address) "fidonet#1:163/207.0"
  113.    FalseJump callconnect3
  114.    set host.sysop "Mad WPL"
  115.    Print "It's Mel\n"
  116.    callconnect3:
  117.    set MinSendPri 0 MaxSendPri 127
  118.  
  119.  ; Send files destined to this site, regardless of YooHoo
  120.    set called $(remote.address)
  121.  ;   Connected $(remote.zone):$(remote.net)/$(remote.node).$(remote.point)
  122.    Connected $(called)
  123.  
  124.  
  125.  ; don't allow 'request on us' type information, even though it's not possible
  126.  ; with the current protocols anyways.
  127.    set host.freq FALSE
  128.    GetOutbound
  129.    PutLog "[$(line)] $<time> GetOutbound: $(event) Wzcap:$(host.wzcap)"
  130.    Cmpi $(event) WAZOO
  131.    FalseJump callconnect.1
  132.    cmpi $(called) $(remote.address)
  133.    TrueJump callconnect.2
  134.    PutLog "[$(line)] $<time> Called $(called) and got $(remote.address)"
  135.  
  136.    callconnect.2:
  137.    set IsOutbound TRUE
  138.    SubJump wazoo
  139.    set IsOutbound FALSE
  140.  
  141.  ; $(remote.wzfreq) is a boolean - Send FREQ's anyways...
  142.    FindFreq $(called)
  143.    cmpi $(host.wzcap) 64
  144.    truejump dofunkyout
  145.    cmpi $(host.wzcap) 8
  146.    truejump zedzapout
  147.    cmpi $(host.wzcap) 4
  148.    truejump zedzipout
  149.    setmailerflags "DY,PN"
  150.    Print "xprsetup: $(ftsflags.$(remote.product))\n"
  151.    XprSetup xprfts.library "$(ftsflags.$(remote.product))"
  152.    SetUpdate "RAW:700/10/640/130/FTS1 outbound on line $(line)/inactive"
  153.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  154.    XprSend ""
  155.    PutLog "[$(line)] $<time> Outbound $(RC)"
  156.    XprClose
  157.    Setupdate NULL
  158.    Print "Session Stat: $(RC)\n"
  159.    PutLog "[$(line)] $<time> Session result $(RC)"
  160.    ReportSesStat $(RC)
  161.    Jump waitring
  162.  
  163.    callconnect.1:
  164.    Cmpi $(event) FTS1
  165.    TrueJump callconnect.2
  166.    ReportSesStat 99
  167.    Jump waitring
  168.  
  169.    callconnect1:
  170.    PutLog "[$(line)] $<time> UUCP Call to $(remote.address)"
  171.  ; Generic shell execution
  172.    System "uucp:c/uucico -o -s$(remote.address) -DEVICE $(device) -UNIT $(unit)"
  173.    ReportSesStat 3
  174.    Jump waitring
  175.  
  176.  freeline:
  177.    Print "Trying to Free Line\n"
  178.  ; close the modem to allow for another device to grab the line
  179.    ModemClose
  180.  
  181.  ; an 'ewe-icky-kludge' to wait a bit.  TODO: Fix this
  182.    System "Wait 3"
  183.  
  184.  slaveloop:
  185.    SubJump setglobals
  186.    ModemOpen
  187.    Print "ModemOpen $(RC)\n"
  188.    TrueJump waitring
  189.  ; what about if it failes?  Maybe just exit the slave with a RETURN?
  190.    PutLog "Death, Drugs, and Dead modems!!!"
  191.    FlushLog
  192.    return
  193.  
  194.  waitring:
  195.  ; Variable <abort> figures out the count of 'abort' requests.
  196.    Print "Abort:$<abort>\n"
  197.    set RC $<abort>
  198.    FalseJump waitring1
  199.      PutLog "[$(line)] $<time> Exiting Slave"
  200.      ModemClose
  201.      return
  202.  
  203.  ; Initialize the modem - Return is 'false' if init string not successfull.
  204.  
  205.  wAiTrInG1:
  206.    Print "ModemInit In"
  207.    ModemInit
  208.    Print "ModemInit $(RC)\n"
  209.    FalseJump freeline
  210.  
  211.  ; Check the call queue for a call - Will set the appropriate variables if a
  212.  ; call was present, and return 'TRUE' in RC
  213.    CheckCall
  214.    Print "CheckCall: $(RC)\n"
  215.    TrueJump dodial
  216.  
  217.    cmpi $(state) "WAITING"
  218.    TrueJump waitring0
  219.  
  220.  ; Set the slave state to 'Waiting'.
  221.    set state "WAITING"
  222.    PutLog "[$(line)] $<time> Waiting for Call..."
  223.    FlushLog
  224.    Print "WaitRing\n"
  225.  ; SubJump is a subroutine calling command - a 'Return' will bring execution back
  226.  ; to this point.
  227.    SubJump setglobals
  228.  
  229.  waitring0:
  230.    set OwnDevUnit TRUE
  231.  ; $(CallInterupt) sets whether a rexx CALL command will Interupt the GetResponse
  232.    set CallInterupt TRUE
  233.    Print "GetResponse-in\n"
  234.    GetResponse 45
  235.    Print "GetResponse-Out: $(RC) Event:$(event)\n"
  236.    set OwnDevUnit FALSE
  237.    set CallInterupt FALSE
  238.    Cmpi $(event) OWNDEVUNIT
  239.    TrueJump freeline
  240.    CmpI $(event) "ring"
  241.    FalseJump waitring
  242.  
  243.    set STATE "ANSWERING"
  244.    Print "MRing - $(lastresponse)\n"
  245.  
  246.  ; Smartsend uses all the special characters while sending (~,`,^,v,|)
  247.    SmartSend "ATA|"
  248.    PutLog "[$(line)] $<time> $(lastresponse)"
  249.    FlushLog
  250.  
  251.  ; Set the slave state to "Inbound"
  252.    GetResponse 90
  253.    Print "Mring-Out: $(RC) Event:$(event)\n"
  254.    cmpi $(event) "CONNECT"
  255.    TrueJump waitring3
  256.    cmpi $(event) "FAX"
  257.    FalseJump waitring
  258.    PutLog "[$(line)] $<time> Fax Call."
  259.  ; Insert FAX software here...
  260.    Jump waitring
  261.  
  262.  waitring3:
  263.    set host.sysop "Russell McOrmond"
  264.    set host.sitename "AmigaTronix: I hear ya Knocking!"
  265.    set MaxSendPri 127 MinSendPri -127
  266.    PutLog "[$(line)] $<time> $(lastResponse)($(baud))"
  267.  
  268.  ; Delay for 4 seconds - Delay requires an 'open modem' at the moment
  269.    Delay 4
  270.  
  271.    Print "After Delay\n"
  272.  ; send some text out the modem with no 'interpretation' or change.
  273.  ; This is test debugging info...
  274.    Send "ModemClear\n"
  275.    ModemClear
  276.    mconnect:
  277.    set temp "Welcoming you with ${WPLName}\n\r\nAmigaTronics Network support Line $(LINE)\r\n\r\nTHERE IS NO BBS at this time!\r\n\r\nType 'info' for more information\r\nDo not Login:"
  278.    Print $(temp)
  279.    Send $(temp)
  280.  ; clears the variable so that any memory is free'd.
  281.    Clear temp
  282.  
  283.  ; check for the inbound event (YooHoo,Login,FTS1,etc)
  284.    set host.freq TRUE
  285.    GetInbound 60
  286.    PutLog "[$(line)] $<time> Event: $(event) NameBuf: $(namebuf) Wzcap:$(host.wzcap)"
  287.    cmpi $(event) LOGIN
  288.    FalseJump mconnect2
  289.      cmpi $(namebuf) ""
  290.      TrueJump mconnect
  291.  
  292.      set UserName $(namebuf)
  293.      PutLog "[$(line)] $<time> Running External Command for User: $(UserName)"
  294.      System "network:bin/login <null: >null: -b$(baud) -lower -ouuspool:logfile -puulib:passwd -d$(device) -u$(unit) \"$(UserName)\""
  295.      Print "Returned: $(RC)\n"
  296.      ReportSesStat 666
  297.      System "run rx uuxqt n "
  298.      Jump waitring
  299.  
  300.    mconnect2:
  301.    cmpi $(event) FTS1
  302.    FalseJump mconnect3
  303.      setmailerflags "DY,PY"
  304.      Set remote.address 1:1/1.1
  305.      ; A guess at a good set of flags...
  306.      XprSetup xprfts.library "7y,cy,ob,ib,sy,bn,an,ny,wy,fy"
  307.      SetUpdate "RAW:700/10/640/130/FTS1 inbound on line $(line)/inactive"
  308.      PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  309.      XprReceive ""
  310.      PutLog "[$(line)] $<time> Inbound $(RC)"
  311.      XprClose
  312.      SetUpdate null
  313.      Print "Session Stat: $(RC)\n"
  314.      PutLog "[$(line)] $<time> Session result $(RC)"
  315.      ReportSesStat $(RC)
  316.      Jump waitring
  317.  
  318.    mconnect3:
  319.    Cmpi $(event) GOTYOOHOO
  320.    FalseJump mconnect4
  321.     SubJump wazoo
  322.     FalseJump waitring
  323.     WazooRespond
  324.     Print "Wazoo $(event)\n"
  325.     Cmpi $(event) 2U2
  326.     FalseJump waitring
  327.  ; Send files destined to the site
  328.  ;   Connected $(remote.zone):$(remote.net)/$(remote.node).$(remote.point)
  329.    Connected $(remote.address)
  330.  
  331.     cmpi $(host.wzcap) 64
  332.     truejump dofunkyin
  333.     cmpi $(host.wzcap) 8
  334.     truejump zedzapin
  335.     cmpi $(host.wzcap) 4
  336.     truejump zedzipin
  337.     setmailerflags "DY,PN"
  338.     Print "xprsetup: $(ftsflags.$(remote.product))\n"
  339.     XprSetup xprfts.library "$(ftsflags.$(remote.product))"
  340.     SetUpdate "RAW:700/10/640/130/DietIFNA receive on line $(line)/inactive"
  341.     PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  342.     XprReceive ""
  343.     PutLog "[$(line)] $<time> Inbound $(RC)"
  344.     XprClose
  345.     Setupdate NULL
  346.     Print "Session Stat: $(RC)\n"
  347.     PutLog "[$(line)] $<time> Session result $(RC)"
  348.     ReportSesStat $(RC)
  349.     Jump waitring
  350.  
  351.    mconnect4:
  352.    ReportSesStat 111
  353.    Jump waitring
  354.  
  355.  ; this subroutine is called when a file is successfully received.
  356.  filenotify:
  357.    set RC $(FTS1)
  358.    FalseJump filenotify1
  359.    PutLog "[$(line)] $<time> FTS1 Receive $(remfile) ($(recfile))"
  360.    Cmpi $(recfile) 1
  361.    FalseJump filenotify0
  362.  ; file requests not handled in FTS1
  363.    PutLog "[$(line)] $<time> FirstFile"
  364.    set $(remote.address) fidonet#1:1/1.2
  365.  filenotify0:
  366.    return
  367.  
  368.  filenotify1:
  369.    PutLog "[$(line)] $<time> WAZOO Receive $(remfile) ($(recfile))"
  370.    Pattern $(remfile) #?.REQ
  371.    Falsejump filenotify0
  372.    set whatrun "run network:bin/xfreqsh >>network:req.log network:wnotify.cfg $(remfile) $(infile) \"$(remote.address)\""
  373.    PutLog "[$(line)] $<time> $(whatrun)"
  374.    system $(whatrun)
  375.    return
  376.  
  377.  zedzipout:
  378.   ; Use dummy if no other files exist
  379.    setmailerflags "DE,PN"
  380.    XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,NN,M1024
  381.    SetUpdate "RAW:700/10/640/130/ZedZip outbound on line $(line)/inactive"
  382.    jump zmodemout
  383.  zedzapout:
  384.   ; turn off the generation of the dummy poll packet
  385.    setmailerflags "DN,PN"
  386.    XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192,C$(BAUD)
  387.    SetUpdate "RAW:700/10/640/130/ZedZap outbound on line $(line)/inactive"
  388.  zmodemout:
  389.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  390.    XprSend ""
  391.    PutLog "[$(line)] $<time> Send $(RC)"
  392.    FalseJump zmodemclose
  393.    Print "Turn around and receive\n"
  394.    XprReceive ""
  395.    PutLog "[$(line)] $<time> Receive $(RC)"
  396.  zmodemclose:
  397.    XprClose
  398.    Setupdate NULL
  399.    ReportSesStat $(RC)
  400.    Jump waitring
  401.  
  402.  zedzipin:
  403.   ; Use dummy if no other files exist
  404.    setmailerflags "DE,PN"
  405.    XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,NN,M1024
  406.    SetUpdate "RAW:700/10/640/130/ZedZip Inbound on line $(line)/inactive"
  407.    jump zmodemin
  408.  zedzapin:
  409.   ; turn off the generation of the dummy poll packet
  410.    setmailerflags "DN,PN"
  411.    XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192,C$(BAUD)
  412.    SetUpdate "RAW:700/10/640/130/ZedZap inbound on line $(line)/inactive"
  413.  zmodemin:
  414.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  415.    XprReceive ""
  416.    PutLog "[$(line)] $<time> Receive $(RC)"
  417.    FalseJump zmodeminclose
  418.    Print "Turn around and send\n"
  419.    XprSend ""
  420.    PutLog "[$(line)] $<time> Send $(RC)"
  421.  zmodeminclose:
  422.    XprClose
  423.    Setupdate NULL
  424.    ReportSesStat $(RC)
  425.    Jump waitring
  426.  
  427.  dofunkyin:
  428.    setmailerflags "DY,PN"
  429.    XprSetup xprfts.library $(TESTFLAGS)
  430.    SetUpdate "RAW:700/10/640/130/TESTING in line $(line)/inactive"
  431.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  432.    XprReceive ""
  433.    PutLog "[$(line)] $<time> Inbound $(RC)"
  434.    XprClose
  435.    Setupdate NULL
  436.    Print "Session Stat: $(RC)\n"
  437.    PutLog "[$(line)] $<time> Session result $(RC)"
  438.    ReportSesStat $(RC)
  439.    Jump waitring
  440.  
  441.  dofunkyout:
  442.    setmailerflags "DY,PN"
  443.    XprSetup xprfts.library $(TESTFLAGS)
  444.    SetUpdate "RAW:700/10/640/130/Testing Out line $(line)/inactive"
  445.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  446.    XprSend ""
  447.    PutLog "[$(line)] $<time> OutBound $(RC)"
  448.    XprClose
  449.    Setupdate NULL
  450.    Print "Session Stat: $(RC)\n"
  451.    PutLog "[$(line)] $<time> Session result $(RC)"
  452.    ReportSesStat $(RC)
  453.    Jump waitring
  454.  
  455.  ; called on both inbound and outbound after receiving a yoohoo
  456.  wazoo:
  457.    PutLog "[$(line)] $<time> $(remote.sitename) ($(remote.address))"
  458.    PutLog "[$(line)] $<time> Sysop: $(remote.sysop)"
  459.    PutLog "[$(line)] $<time> Cap: $(remote.wzcap), Domain:$(remote.wzdomain)"
  460.    cmpi $(host.wzcap) 1
  461.    falsejump wazoo.1
  462.    PutLog "[$(line)] $<time> WaZoo method: DietIFNA"
  463.    jump wazoo2
  464.    wazoo.1:
  465.    cmpi $(host.wzcap) 4
  466.    falsejump wazoo.2
  467.    PutLog "[$(line)] $<time> WaZoo method: ZedZip"
  468.    jump wazoo2
  469.    wazoo.2:
  470.    cmpi $(host.wzcap) 8
  471.    falsejump wazoo.3
  472.    PutLog "[$(line)] $<time> WaZoo method: ZedZap"
  473.    jump wazoo2
  474.    wazoo.3:
  475.    PutLog "[$(line)] $<time> WaZoo method: Testing"
  476.  
  477.  wazoo2:
  478.    cmpi $(mailername.$(remote.product)) ""
  479.  truejump wazoo2.1
  480.    PutLog "[$(line)] $<time> Remote Uses $(mailername.$(remote.product)) version $(remote.product_maj).$(remote.product_min)"
  481.    jump wazoo2.2
  482.  wazoo2.1:
  483.    PutLog "[$(line)] $<time> Remote Uses Prod:$(remote.product) version $(remote.product_maj).$(remote.product_min)"
  484.  wazoo2.2:
  485.  
  486.    set RC $(IsOutbound)
  487.    TrueJump wazoo6
  488.  
  489.    Print "It's an Inbound?\n"
  490.    seta remote $(remote.address)
  491.    system "network:bin/jamtool -$(remote.network) $(remote.address) $(line) nodelist: "
  492.    Print "Lookup: $(RC)\n"
  493.  ; node was found!
  494.    cmpi ${$(line).password} ""
  495.    TrueJump wazoo4
  496.  ; there is a password
  497.    CmpI ${$(line).password} $(remote.password)
  498.    TrueJump wazoo3
  499.    PutLog "[$(line)] $<time> Password Error: His:'$(remote.password)' Ours:'${$(line).password}'"
  500.    set RC FALSE
  501.    return
  502.    
  503.  wazoo6:
  504.    set RC TRUE
  505.    return
  506.  
  507.  wazoo3:
  508.    PutLog "[$(line)] $<time> Password Protected Session"
  509.    Jump wazoo6
  510.  
  511.  wazoo4:
  512.    PutLog "[$(line)] $<time> No Password Set"
  513.    Pattern $(remote.address) "fidonet?1:163/109.#?"
  514.    FalseJump wazoo6
  515.    PutLog "[$(line)] $<time> Improperly set up point!"
  516.    set RC FALSE
  517.    return
  518.  
  519.  setglobals:
  520.  ; This section should give a good idea of what variables are used by
  521.  ; WPL's system.
  522.  
  523.  ; clear temporary variables - As well as for documentation purposes, it will
  524.  ; free up some memory for ya ;-)
  525.    Clear event fts1 infile isoutbound whatrun 
  526.    Clear remfile remote.address remote.cost remote.domain remote.flags 
  527.    Clear remote.maxbaud remote.net remote.node remote.point remote.zone
  528.    Clear remote.number remote.product remote.product_maj remote.product_min 
  529.    Clear remote.sitename remote.sysop remote.wzcap remote.wzdomain remote.password
  530.    Clear NameBuf OwnDevUnit UserName
  531.  
  532.  ; System set up variables cleared.
  533.    Clear process Workbench RC Result2 
  534.  
  535.  ; Reset constants
  536.  
  537.  ; Inbound directory used to place inbound files - '/' required.
  538.    set inbound "network:inbound/" 
  539.  
  540.  ; used by PutLog and FlushLog
  541.    set currentlog all
  542.    set logport WELMATLOG
  543.  
  544.  ; directory to look for 'special' files such as 2-d and 4-d .REQ files.
  545.    set outbound "network:outbound/"
  546.  
  547.    set pickup "TRUE" trywazoo "TRUE" tryfts1 "TRUE" 
  548.    set wfnotify "filenotify" stack 32000
  549.  
  550.    set MaxSendPri 127 MinSendPri -127
  551.    set BufferSize        1024
  552.  
  553.    seta host fidonet#1:163/109.0
  554.  ;  Print "Host Network: $(host.network)  Domain: $(host.domain)\n"
  555.  ;  Print "Zone: $(host.zone) net: $(host.net) node: $(host.node) point: $(host.point)\n"
  556.  
  557.    set host.sysop "Russell McOrmond"
  558.    set host.Sitename "AmigaTronx"
  559.    set host.wzdomain "fidonet"
  560.  
  561.  ; Variables used by ModemInit
  562.    set InitLoop          8
  563.    set InitWait          1
  564.    set Prompt            OK
  565.    set Atten        $(atten)
  566.    set HangupString $(hangupstring)
  567.    set InitString   $(initstring)
  568.  
  569.  ; Wazoo capability bits are 'added' together - 'GetOutbound' and 'GetInbound'
  570.  ; reset $(host.wzcap) to a single protocol value after a YooHoo negotiation.
  571.  ;
  572.  ; 1  - Can do fast "FTS-0001" (DietIFNA)
  573.  ; 2  - Reserved by Opus-CBCS
  574.  ; 4  - Does ZModem, 1K blocks (ZedZip), generate dummy .PKT
  575.  ; 8  - Can do ZModem variant (ZedZap)
  576.  ; 16 - Can do Janus
  577.  ; 32 - reserved by FTSC
  578.  ; 64 - reserved by FTSC  - DO NOT use - I'm using for testing!!
  579.  
  580.   set host.wzcap 13
  581. ;  set host.wzcap 1
  582.  
  583.  ;   !!!WARNING!!!  DEATH , TAXES, FAILED SESSIONS
  584.  ;    Do not leave the settings the way I have set them as they
  585.  ; are INCORRECT.  I am using bit '64' for testing purposes, which is an
  586.  ; illegal wazoo bit.  Do not ever call another WPL site with this bit
  587.  ; turned on (Expecially myself) as I could very easily be using some other
  588.  ; protocol that day.
  589.  ;   Also remember to change ALL the references to host.wzcap as there is
  590.  ; more than just this one.
  591.  
  592.  ;   set host.wzcap 77
  593.  
  594.  
  595.    ; Set the label that WPL will go to when it start and ends a send or receive
  596.    ; of a file in the XPR interface.
  597.    ; (Set the value equal to the name of the variable itself to make life simple)
  598.    set postinbound postinbound postoutbound postoutbound
  599.    set preinbound preinbound preoutbound preoutbound
  600.  
  601.    set mailername.0 "MelMail"
  602.    ; MelMail actually slows down when you tell it that you're going to do
  603.    ; sealink and then do Xmodem. Let's send them a Telink and not a Sealink
  604.    ; header.
  605.    set ftsflags.0 "ot"
  606.  
  607.    set mailername.5 "OPUS"
  608.    set mailername.7 "WPL based mailer"
  609.    set mailername.12 "FrontDoor"
  610.    set mailername.27 "Binkley"
  611.    set mailername.57 "TrapDoor"
  612.  
  613.    set mailername.58 "Welmat"
  614.    ; Welmat doesn't need MDM7 stuff, but does allow for big filenames
  615.    ; Flags for old Welmats that are doing DietIFNA.
  616.    set ftsflags.58 "7n,by"
  617.  
  618.    set mailername.66 "TIMS"
  619.  
  620.    set mailername.106 "MacWoof"
  621.    ; Will work with Steve to see what the flags should be.
  622.    set ftsflags.106 ""
  623.  
  624.    set mailername.170 "Xenolink"
  625.    return
  626.  
  627.   preinbound:
  628.     PutLog "[$(line)] $<time> Receiving: $(tempfile) ($(remfile))"
  629.     return
  630.  
  631.   postinbound:
  632.     PutLog "[$(line)] $<time> $(filestatus): $(infile) ($(remfile))"
  633.  ; check to make sure the file was 'received'.
  634.     FalseReturn
  635.     PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%) FileSize: $(filesize) bytes"
  636.     jump filenotify
  637.  
  638.   preoutbound:
  639.     PutLog "[$(line)] $<time> Sending: $(localfile) ($(filesize) bytes)"
  640.     PutLog "[$(line)] $<time> Remote name: $(remfile)"
  641.     return
  642.  
  643.   postoutbound:
  644.     PutLog "[$(line)] $<time> $(filestatus): $(localfile)"
  645.  ; check to make sure the file was 'sent'.
  646.     FalseReturn
  647.     PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%) FileSize: $(filesize) bytes"
  648.     return
  649.  
  650.  
  651.  ; This is a routine used to set the clock according to the
  652.  ; National Research Center's time constant.
  653.  ; First, I want my Supra 2400 modem.
  654. nrccall:
  655.    cmpi $(line) 1
  656.    truejump nrctime
  657.    CallForward 1
  658.    jump waitring 
  659.  
  660.  ; This is a routine used to set the clock according to the
  661.  ; National Research Center's time constant.
  662. nrctime:
  663.    setbaud 300
  664.    ModemInit
  665.    SmartSend "|~~ATDT9527729|"
  666.    set state DIALING
  667.    clear event
  668.    GetResponse 45
  669.    Print "GetResponse-Out: $(RC) Event:$(event)\n"
  670.    cmpi $(event) "CONNECT"
  671.    FalseJump nrcout
  672.    set state SESSION
  673.    Print "Connected to NRC - Running Library\n"
  674.    XprSetup xprclock.library "Y1993,O-5"
  675.    PutLog "[$(line)] $<time> Setup $(XprSetup) RC:$(RC)"
  676.    XprSend ""
  677.    PutLog "[$(line)] $<time> NRC $(RC)"
  678.    XprClose
  679.    Setupdate NULL
  680. nrcout:
  681.    Print "Switching back to 2400bps\n"
  682.    setbaud 2400
  683.    jump waitring
  684.  
  685.  ; This is the startup program ran by my first slave.  Note that the only
  686.  ; variable that is 'automatically' set is $(line), all others must be set
  687.  ; within the WPL script.
  688.  startup-1:
  689.  ; Internal Supra 2400ZI
  690.   set device "modem0.device" unit 0 serflags 160 DTR_Control 0 serbuf 4
  691.  ; Broken ASDG DSB
  692.  ;  set device "siosbx.device" unit 0 serflags 160 DTR_Control 0
  693.  ; A2232 with Supra 2400 external
  694.  ; set device "serial.device" unit 6 serflags 160 DTR_Control 0
  695.  
  696.  ; DTR control:
  697.  ;  0 - No support for DTR
  698.  ;  1 - Internal port 'twiddling the bits' - *ONLY USE THIS ON the internal
  699.  ;      serial.device hardware!!!*
  700.  ;  2 - SET_CTRL_LINES method (ASDG DSB, PDIO, CMI Multiport, CSA Magnum)
  701.  ;  Will be expanded to include any new methods (IE CBM??) that come out.
  702.  
  703.  
  704.  ; Sets up the status window.
  705.    SetStatus "RAW:1030/0/340/100/Line #$(line) - Supra 2400/inactive"
  706.  ; Any 'print' command goes to the status window.
  707.    Print "This is a Print inside slave 1($(line))\n"
  708.  
  709.  ; Set up the response strings for GetResponse - These are 'line specific'.
  710.  ;  The first parameter is the 'event'.  If it is a number, or if it is 'find',
  711.  ; then it is a special event called 'CONNECT' where the baud rate is set to
  712.  ; the number, or figured out from the %d value in 'find'.
  713.    AddResponse busy "BUSY"
  714.    AddResponse maid "NO CARRIER"
  715.    AddResponse line "NO DIALTONE"
  716.    AddResponse 300 "CONNECT"
  717.    AddResponse find "CONNECT %d"
  718.    AddResponse ring "RING"
  719.  
  720.  
  721.    ; Sets $(baud) and $(baudlocked) and will set device baud rate if device
  722.    ; is open
  723.    setbaud 2400
  724.  
  725.    set Locked            FALSE
  726.    set Atten             ATZ|
  727.    set HangupString      ~~~+`+`+~~~|AT|~~A`T`H`0`|
  728.    set InitString        ATEHLMQV1X4S0=0S2=43S10=20S12=25|
  729.  
  730.    set SlowModem         FALSE
  731.  
  732.    jump slaveloop 
  733.  
  734.  ; This is the startup program ran by my second slave
  735.  startup-2:
  736.    SetStatus "RAW:690/0/340/100/Line #$(line) - ZyXEL U-1496S/inactive"
  737. ;   SetStatus "RAW:690/0/340/100/Line #$(line) - Supra FAXmodem/inactive"
  738.    Print "This is a Print inside slave 2($(line))\n"
  739.    AddResponse busy BUSY
  740.    AddResponse maid "NO CARRIER"
  741.    AddResponse line "NO DIALTONE"
  742.    AddResponse 300 "CONNECT"
  743.    AddResponse find "CONNECT %d"
  744.    AddResponse ring RING
  745.    AddResponse fax "+FCON"
  746.  
  747.  ;  Device and Unit for the serial port.
  748.  ; Serial flags are added together to get value desired.
  749.  ;  1   - PARITY on
  750.  ;  2   - Parity Odd
  751.  ;  4   - 7-Wire Modem (RTS/CTS)
  752.  ;  16  - Rad Boogie 
  753.  ;  32  - Shared Mode
  754.  ;  128 - Disable Xon/Xoff handshaking
  755.  
  756.  ;  NOTE: One should always disable Xon/Xoff and use Shared mode
  757.  ;  Also, never set the two bits not mentioned above!
  758.  
  759.  ; Internal serial port
  760.  set device "serial.device" unit 0 serflags 164 DTR_Control 1 serbuf 16
  761.  
  762.  ; A2232
  763.  ;set device "serial.device" unit 8 serflags 164 DTR_Control 0
  764.  
  765.  ; Gemini 2-port board
  766.  ; set device gemini.device unit 0 serflags 164 DTR_Control 0 serbuf 16
  767.  
  768.    set Atten             AT|
  769. ;   set Atten             ATZ0|~~~
  770.    setBaud 19200
  771.    set HangupString      "~~+++~~|~ATH0|"
  772. ;   set InitString        ATM0E0W2&D2S25=1|
  773.    set InitString        ATZ|
  774.    set Locked            TRUE
  775.    set SlowModem         FALSE
  776.  
  777.  
  778.    jump slaveloop
  779.  
  780.  
  781.  ;  The main function called by WPL in the MCP is 'startup' - This should
  782.  ; always be included, and is the first label called!
  783.  ; It is included at the end of the config for efficiency reasons (It's only
  784.  ; called 'once')
  785.  sTaRtUp:
  786.  ; For logging purposes.
  787.    set line M
  788.    set currentlog all
  789.    set logport WELMATLOG
  790.  
  791.    PutLog "[$(line)] $<time> Startup on $<date> with ${WPLName}"
  792.  
  793.    set stack 32000
  794.  ; Interesting way to log the output of a program.
  795.  ; The only problem is the extra return character.
  796.  
  797. ; system "version >env:version"
  798.  system "echo `version` NOLINE >env:version"
  799.  PutLog "[$(line)] $<time> ${version}"
  800.  
  801.  ;  Launch the real slaves.
  802.  ;  The parameters are  <slave> <msg port name> <startup func>
  803.  Launch 1 SLAVE1 startup-1
  804.  Launch 2 SLAVE2 startup-2
  805.  
  806.  ; Log the numer of slaves, and then exit this slave as it is just used to
  807.  ; properly launch the other slaves at the moment.  This whole thing will
  808.  ; go away when wpl.library exists.
  809.  PutLog "[$(line)] $<time> Started $<slaves> slaves"
  810.    
  811.  system "wait 30"
  812.  
  813.  PutLog "[$(line)] $<time> SuperSlave Exiting..."
  814.  
  815.    SetStatus "t:wpl.out"
  816.    -ListConfig
  817.    return
  818.